# CH 3/18/2010

from Tkinter import *
import sys
class App:
    def __init__(self, master):
        frame = Frame(master)
        frame.pack()
        # using command=lambda:sys.exit() exits even when run within an IDE 
        self.button = Button(frame, text="QUIT", fg="red", command=lambda:sys.exit())    
        self.button.pack()


root = Tk()
app = App(root)
root.mainloop()
